/**
 * value true 功能显示
 */
const SUPER_YWH = [process.env.VUE_APP_SUPER, process.env.VUE_APP_YWH];
const JW_WY_YWH = [
  process.env.VUE_APP_JW,
  process.env.VUE_APP_WY,
  process.env.VUE_APP_YWH
];
const SUPER_JD = [process.env.VUE_APP_SUPER, process.env.VUE_APP_JD];

export const auths = (role) => {
  let super_ywh = SUPER_YWH.includes(role);
  let jw_wy_ywh = JW_WY_YWH.includes(role);
  let super_jd = SUPER_JD.includes(role);

  return {
    //业主管理
    "owner.unbind": super_ywh,
    "owner.delete": super_ywh,
    "owner.check": super_ywh,
    //小区管理
    "community.unbind": super_ywh,
    //工单汇览
    "order.reply": jw_wy_ywh,
    "order.deleteReply": jw_wy_ywh,
    //管理主题
    "topic.add": super_jd,
    "topic.delete": super_jd,
    "topic.changState": super_jd
  };
};
